openvino: Enable CPU plugin on other architectures#428463
openvino: Enable CPU plugin on other architectures#428463smaeul wants to merge 1 commit intoNixOS:masterfrom
Conversation
The "Intel CPU" plugin name is a bit misleading, as the same plugin is required to run models on the CPU on other architectures. On AArch64 the plugin uses the ARM Compute Library, which needs a small patch to fix building with LTO enabled in the OpenVino build system. Closes: NixOS#388048
| --replace-fail 'toolchain_prefix + "ar"' '"${stdenv.cc.cc}/bin/gcc-ar"' \ | ||
| --replace-fail 'toolchain_prefix + "ranlib"' '"${stdenv.cc.cc}/bin/gcc-ranlib"' |
There was a problem hiding this comment.
This will definitely not work with clang 😅 Can we use the generic ar and ranlib instead?
There was a problem hiding this comment.
No, the GNU toolchain does not install the LTO plugin, so using the prefixed tools is required to understand LTO objects and generate a working static library. See also for example #188544 #384599. A git grep -w gcc-ar shows several packages doing the same thing. I suppose the right thing to do is gate the patch behind stdenv.cc.isGNU? (LLVM+binutils would need to use llvm-ar if that is a supported combination.)
There was a problem hiding this comment.
@smaeul does this have any consequences for the x86 environments? Seems like this should be rather a fix that needs to happen on openvino repository side. Is there an Issue thread? Let me know if I'm wrong, thats been my first thoughts ;)
The "Intel CPU" plugin name is a bit misleading, as the same plugin is required to run models on the CPU on other architectures. On AArch64 the plugin uses the ARM Compute Library, which needs a small patch to fix building with LTO enabled in the OpenVino build system.
Closes: #388048
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.